package tools.util;

public class Format
{
  public static String replace(String paramString1, String paramString2, String paramString3)
  {
    if (null == paramString1)
      return null;
    StringBuffer localStringBuffer = new StringBuffer();
    int i = paramString1.length();
    int j = paramString2.length();
    int k = 0;
    int m = 0;
    while ((m = paramString1.indexOf(paramString2, k)) >= 0)
    {
      localStringBuffer.append(paramString1.substring(k, m));
      localStringBuffer.append(paramString3);
      k = m + j;
    }
    if (k < i)
      localStringBuffer.append(paramString1.substring(k));
    return localStringBuffer.toString();
  }
}

